
<div id="company_info">
<?php
   echo $this->Html->tag('div', $this->Html->tag('span', __('Name <samp>:</samp>', true)).'<p><strong>'.$company['Company']['name'].'</strong><p>', array('class' => 'row_company_info'));
   echo $this->Html->tag('div', $this->Html->tag('span', __('Address <samp>:</samp>', true)).'<p> #'.$company['Company']['house_number'].' '.
        sprintf(__('Street %s', true), $company['Company']['street']).', '.$company['Company']['city'].', '.$company['Country']['name'].'<p>', array('class' => 'row_company_info'));
   echo $this->Html->tag('div', $this->Html->tag('span', __('Tel <samp>:</samp>', true)).'<p>'. $company['Company']['tel'] .'</p>', array('class' => 'row_company_info'));
    if($company['Company']['fax'])
       echo $this->Html->tag('div', $this->Html->tag('span', __('Fax <samp>:</samp>',true)).'<p>'.$company['Company']['fax'].'</p>', array('class' => 'row_company_info'));

    if($company['Company']['pobox'])
       echo $this->Html->tag('div', $this->Html->tag('span', __('P.O. BOX <samp>:</samp>',true)).'<p>'.$company['Company']['pobox'].'</p>', array('class' => 'row_company_info'));
      if($company['Company']['phone'])
       echo $this->Html->tag('div', $this->Html->tag('span', __('Phone <samp>:</samp>',true)).'<p>'.$company['Company']['phone'].'</p>', array('class' => 'row_company_info'));

    //email
    if($company['Company']['email'])
       echo $this->Html->tag('div', $this->Html->tag('span', __('Email <samp>:</samp>',true)).'<p>'.$this->Text->autoLinkEmails($company['Company']['email']).'</p>', array('class' => 'row_company_info'));
    //website
    if($company['Company']['website'])
       echo $this->Html->tag('div', $this->Html->tag('span', __('Website <samp>:</samp>',true)).'<p>'.$this->Text->autoLinkUrls($company['Company']['website']).'</p>', array('class' => 'row_company_info'));

    //description
    echo $this->Html->tag('div', $company['Company']['description'], array('class' => 'company_description'));
    //Other company create by
    $otherName = $this->Html->tag('h2', sprintf(__('Other companies created by %s', true), $company['User']['username']));
    $p = '';
    if(empty ($otherCompanies)){
        $p = $this->Html->tag('li', __('No other company', true));
    }else{
        foreach($otherCompanies as $c){
            if($c['Company']['logo_48'])
                $logo48 = $this->Html->tag('span',$this->Html->image($c['Company']['logo_48'], array('alt' => $c['Company']['name'])));
            else
                 $logo48 = $this->Html->tag('span',$this->Html->image('/files/company/logo/default_48.png', array('alt' => $c['Company']['name'])));
            $link = $this->Html->link($c['Company']['name'], $c['Company']['slug'], array('title' => sprintf(__('View %s', true), $c['Company']['name'])));
            $p .= $this->Html->tag('p', $logo48.$link, array('class' => 'clearfix'));
        }
    }
    $div = $this->Html->tag('div', $p, array('id' => 'other_companies'));
    $ads = $this->Html->tag('div','ads', array('id' => 'ads_with_other_company'));
    
    //echo $this->Html->div('other_company', $otherName);
    echo $this->Html->tag('div',  $otherName.$div.$ads, array('id' => 'other_companies_gads', 'class' => 'clearfix'));
    echo '<div class="pace_250"></div>';
    if($company['Company']['user_id'] == $this->Bayon->userId())
            echo $this->Html->tag('div', $this->Html->link(__('<span class="ui-icon ui-icon-pencil"></span> Edit Company', true), '/company/edit/'.$company['Company']['id'], array('class' => 'ui-state-default ui-corner-all', 'id' => 'edit_compnany_link', 'escape' => false)), array('style' => 'margin-top: 10px'))

?>

</div>
